import java.util.Scanner;
public class text2 {
    public static int maxAdd(int a, int b) {
        int c = 1;
        if (a < b) {
            c = b;
        } else {
            c = a;
        }
        return c;
    }
        public static double maxAdd(double x ,double y ,double z){
            double temp=0.0;
            if(x>y) {
                temp = y;
                y = x;
                x = temp;
            }
                if (x > z) {
                    temp=z;
                    z=x;
                    x=z;
                }
                if(y>z){
                    temp=z;
                    z=y;
                    y=z;
            }
                return z;

        }
    //求最大值方法的重载
        //在同一个类中定义多个方法：要求不仅可以求2个整数的最大值，还可以求3个小数的最大值？
        public static void main(String[] args){
            Scanner scanner = new Scanner(System.in);
            System.out.println("请输入m，n的值");
            int m = scanner.nextInt();
            int n = scanner.nextInt();
            int k = maxAdd(m, n);
            System.out.println("最大值为"+k);
            System.out.println("请分别输入三个小数的值");
            double o = scanner.nextDouble();
            double p = scanner.nextDouble();
            double q = scanner.nextDouble();
            double h = maxAdd(o, p, q);
            System.out.println("最大值为"+h);
        }



    }


